package com.zy.mc_module.ui.micang;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.viewbinding.ViewBinding;

import com.zy.mc_module.base.kotlin.BaseActivity;
import com.zy.mc_module.databinding.ActivityMineTeamBinding;
import com.zy.mc_module.ui.micang.adapter.MineTeamAdapter;
import com.zy.mc_module.utils.StatusBarUtil;
import com.zy.mc_module.utils.retrofit.error.ThdException;
import com.zy.mc_module.viewmodel.FilterViewModel;

import java.util.Arrays;
import java.util.Map;

/**
 * 我的团队
 */
public class MineTeamActivity extends BaseActivity<RiceContract.View, RicePresenter, ActivityMineTeamBinding> implements RiceContract.View {
    @NonNull
    @Override
    public ActivityMineTeamBinding getViewBinding() {
        return ActivityMineTeamBinding.inflate(getLayoutInflater());
    }

    @Override
    protected void initView() {
        super.initView();
        StatusBarUtil.setImmersiveStatusBar(this);
        binding.customhead.setLeftClickListener(v -> finish());
        MineTeamAdapter adapter = new MineTeamAdapter(Arrays.asList("1"));
        binding.recyclerview.setLayoutManager(new LinearLayoutManager(context));
        binding.recyclerview.setAdapter(adapter);
    }

    @Override
    protected void initListener() {
        super.initListener();
        FilterViewModel filterViewModel = new FilterViewModel(context, binding.listFilter, true);
        filterViewModel.setOnFilterListener(new FilterViewModel.onFilterListener() {
            @Override
            public void onFilter(Map<String, Object> map) {

            }
        });
    }

    @Override
    public void onError(ThdException error) {

    }

    @Override
    public <T> void onSuccess(T t, int type) {

    }

    @Override
    public void onError(ThdException error, int type) {

    }
}
